package com.lleice.service.service.sys;

import java.util.List;

import com.baomidou.mybatisplus.extension.service.IService;
import com.lleice.service.dto.DepartmentTreeParentDto;
import com.lleice.service.entity.sys.SysDepartment;
import com.lleice.service.qo.sys.DepartmentReq;

/**
 * <p>
 * 机构部门表 服务类
 * </p>
 *
 * @author lizihao
 * @since 2020-11-18
 */
public interface ISysDepartmentService extends IService<SysDepartment> {
	/**
	 * 保存或者更新用户
	 * @param departmentReq 请求体
	 * @throws Exception 需要抛出的异常
	 */
	void saveOrUpdateUser(DepartmentReq departmentReq) throws Exception;
	
	/**
	 * 获取所有机构
	 * @return 机构树结构
	 * @throws Exception 异常
	 */
	List<DepartmentTreeParentDto> getAllDepartment()throws Exception;
	
	/**
	 * 获取所有机构带用户锚点
	 * @param userId 用户id
	 * @return 机构树结构
	 * @throws Exception 异常
	 */
	List<DepartmentTreeParentDto> getAllDepartmentWithUser(Long userId)throws Exception;
}
